package com.t235.gc.feign.biz;

import com.t235.gc.AjaxResult;
import com.t235.gc.entity.Users;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "gc-biz")
public interface DemoRemoteClient {

    @PostMapping("/post1")
    AjaxResult post(@RequestParam("name") String name,@RequestParam("password") String password);

    @PostMapping("/post2")
    AjaxResult post2(@RequestBody Users users);

    @ApiOperation(value = "演示方法1", notes = "演示方法，可以测试是否可以正常访问数据库")
    @GetMapping("/hello")
    AjaxResult hello();
}
